package com.slowfly.rule.engine.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.slowfly.rule.engine.entity.Rule;
import com.slowfly.rule.engine.param.RuleParam;
import com.slowfly.rule.engine.result.PageResult;
import com.slowfly.rule.engine.result.RuleResult;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author shalongfei
 * @since 2024-03-06
 */
public interface IRuleService extends IService<Rule> {

    void setCache();

    void editCache(int type, int id);

    Rule get(Integer id);

    String getScripts(Rule rule);

    Set<Integer> getFeatureIds(Rule rule);

    List<RuleResult> listRule();

    PageResult<RuleResult> pageRule(RuleParam param);

    boolean addRule(RuleParam param);

    boolean editRule(RuleParam param);

    boolean deleteRule(RuleParam param);

    boolean checkDeleteFeature(Integer featureId);
}
